home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1996 June: Reference Library / Dev.CD Jun 96 RL / Dev.CD Jun 96 RL.toast / Technical Documentation / develop / develop Issue 10 / develop Issue 10 code / Apple Event Objects.sea / Apple Event Objects / AppleEventHandlers.c < prev    next >
MacBinary  |  1992-04-08  |  6.4 KB  |  [TEXT/KAHL]

open in: MacOS 8.1     |     Win98     |     DOS

browse contents    |     view JSON data     |     view as text


This file was processed as: MacBinary (archive/macBinary).

ConfidenceProgramDetectionMatch TypeSupport
66% dexvert Compact Compressed (Unix) (archive/compact) ext Supported
1% dexvert MacBinary (archive/macBinary) fallback Supported
1% dexvert Text File (text/txt) fallback Supported
100% file MacBinary II, inited, Wed Apr 8 17:58:46 1992, modified Wed Apr 8 17:58:46 1992, creator Think C, type ASCII, 5848 bytes "AppleEventHandlers.c" , at 0x1758 468 bytes resource default (weak)
99% file data default
49% TrID Macintosh plain text (MacBinary) default
33% TrID raw Group 3 FAX bitmap default (weak)
16% TrID MacBinary 2 default (weak)
100% dearkID deark: macbinary default
100% siegfried fmt/1762 MacBinary (II) default
100% lsar MacBinary default


id metadata
keyvalue
macFileType[TEXT]
macFileCreator[KAHL]



hex view
+--------+-------------------------+-------------------------+--------+--------+
|00000000| 00 14 41 70 70 6c 65 45 | 76 65 6e 74 48 61 6e 64 |..AppleE|ventHand|
|00000010| 6c 65 72 73 2e 63 00 00 | 00 00 00 00 00 00 00 00 |lers.c..|........|
|00000020| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000030| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000040| 00 54 45 58 54 4b 41 48 | 4c 01 00 00 00 00 00 00 |.TEXTKAH|L.......|
|00000050| 00 00 00 00 00 16 d8 00 | 00 01 d4 a6 09 1d 16 a6 |........|........|
|00000060| 09 1d 16 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000070| 00 00 00 00 00 00 00 00 | 00 00 81 81 06 b3 00 00 |........|........|
|00000080| 2f 2a 20 46 69 6c 65 3a | 20 41 70 70 6c 65 45 76 |/* File:| AppleEv|
|00000090| 65 6e 74 48 61 6e 64 6c | 65 72 73 2e 63 20 2a 2f |entHandl|ers.c */|
|000000a0| 0d 23 69 6e 63 6c 75 64 | 65 20 22 41 45 4f 62 6a |.#includ|e "AEObj|
|000000b0| 65 63 74 73 2e 68 22 0d | 23 69 6e 63 6c 75 64 65 |ects.h".|#include|
|000000c0| 20 22 41 45 50 61 63 6b | 4f 62 6a 65 63 74 2e 68 | "AEPack|Object.h|
|000000d0| 22 0d 23 69 6e 63 6c 75 | 64 65 20 22 41 45 52 65 |".#inclu|de "AERe|
|000000e0| 67 69 73 74 72 79 2e 68 | 22 0d 23 69 6e 63 6c 75 |gistry.h|".#inclu|
|000000f0| 64 65 20 22 53 63 72 69 | 70 74 53 63 72 61 70 2e |de "Scri|ptScrap.|
|00000100| 68 22 0d 23 69 6e 63 6c | 75 64 65 20 22 50 72 6f |h".#incl|ude "Pro|
|00000110| 74 6f 74 79 70 65 73 2e | 68 22 0d 0d 0d 76 6f 69 |totypes.|h"...voi|
|00000120| 64 20 49 6e 73 74 61 6c | 6c 41 70 70 6c 65 45 76 |d Instal|lAppleEv|
|00000130| 65 6e 74 48 61 6e 64 6c | 65 72 73 28 76 6f 69 64 |entHandl|ers(void|
|00000140| 29 0d 7b 0d 09 4f 53 45 | 72 72 09 65 72 72 3b 0d |).{..OSE|rr.err;.|
|00000150| 09 6c 6f 6e 67 09 72 65 | 73 75 6c 74 3b 0d 09 0d |.long.re|sult;...|
|00000160| 09 65 72 72 20 3d 20 47 | 65 73 74 61 6c 74 28 67 |.err = G|estalt(g|
|00000170| 65 73 74 61 6c 74 41 70 | 70 6c 65 45 76 65 6e 74 |estaltAp|pleEvent|
|00000180| 73 41 74 74 72 2c 20 26 | 72 65 73 75 6c 74 29 3b |sAttr, &|result);|
|00000190| 0d 09 69 66 20 28 28 65 | 72 72 20 3d 3d 20 6e 6f |..if ((e|rr == no|
|000001a0| 45 72 72 29 20 26 26 20 | 28 72 65 73 75 6c 74 20 |Err) && |(result |
|000001b0| 26 20 31 29 29 20 7b 0d | 09 09 65 72 72 20 3d 20 |& 1)) {.|..err = |
|000001c0| 41 45 4f 62 6a 65 63 74 | 49 6e 69 74 28 29 3b 0d |AEObject|Init();.|
|000001d0| 09 09 0d 09 09 28 76 6f | 69 64 29 41 45 49 6e 73 |.....(vo|id)AEIns|
|000001e0| 74 61 6c 6c 45 76 65 6e | 74 48 61 6e 64 6c 65 72 |tallEven|tHandler|
|000001f0| 28 6b 43 6f 72 65 45 76 | 65 6e 74 43 6c 61 73 73 |(kCoreEv|entClass|
|00000200| 2c 20 6b 41 45 4f 70 65 | 6e 41 70 70 6c 69 63 61 |, kAEOpe|nApplica|
|00000210| 74 69 6f 6e 2c 20 28 45 | 76 65 6e 74 48 61 6e 64 |tion, (E|ventHand|
|00000220| 6c 65 72 50 72 6f 63 50 | 74 72 29 48 61 6e 64 6c |lerProcP|tr)Handl|
|00000230| 65 4f 61 70 70 2c 20 30 | 2c 20 66 61 6c 73 65 29 |eOapp, 0|, false)|
|00000240| 3b 0d 09 09 28 76 6f 69 | 64 29 41 45 49 6e 73 74 |;...(voi|d)AEInst|
|00000250| 61 6c 6c 45 76 65 6e 74 | 48 61 6e 64 6c 65 72 28 |allEvent|Handler(|
|00000260| 6b 43 6f 72 65 45 76 65 | 6e 74 43 6c 61 73 73 2c |kCoreEve|ntClass,|
|00000270| 20 6b 41 45 4f 70 65 6e | 44 6f 63 75 6d 65 6e 74 | kAEOpen|Document|
|00000280| 73 2c 20 20 20 28 45 76 | 65 6e 74 48 61 6e 64 6c |s, (Ev|entHandl|
|00000290| 65 72 50 72 6f 63 50 74 | 72 29 48 61 6e 64 6c 65 |erProcPt|r)Handle|
|000002a0| 4f 64 6f 63 2c 20 30 2c | 20 66 61 6c 73 65 29 3b |Odoc, 0,| false);|
|000002b0| 0d 09 09 28 76 6f 69 64 | 29 41 45 49 6e 73 74 61 |...(void|)AEInsta|
|000002c0| 6c 6c 45 76 65 6e 74 48 | 61 6e 64 6c 65 72 28 6b |llEventH|andler(k|
|000002d0| 43 6f 72 65 45 76 65 6e | 74 43 6c 61 73 73 2c 20 |CoreEven|tClass, |
|000002e0| 6b 41 45 50 72 69 6e 74 | 44 6f 63 75 6d 65 6e 74 |kAEPrint|Document|
|000002f0| 73 2c 20 20 28 45 76 65 | 6e 74 48 61 6e 64 6c 65 |s, (Eve|ntHandle|
|00000300| 72 50 72 6f 63 50 74 72 | 29 48 61 6e 64 6c 65 50 |rProcPtr|)HandleP|
|00000310| 64 6f 63 2c 20 30 2c 20 | 66 61 6c 73 65 29 3b 0d |doc, 0, |false);.|
|00000320| 09 09 28 76 6f 69 64 29 | 41 45 49 6e 73 74 61 6c |..(void)|AEInstal|
|00000330| 6c 45 76 65 6e 74 48 61 | 6e 64 6c 65 72 28 6b 43 |lEventHa|ndler(kC|
|00000340| 6f 72 65 45 76 65 6e 74 | 43 6c 61 73 73 2c 20 6b |oreEvent|Class, k|
|00000350| 41 45 51 75 69 74 41 70 | 70 6c 69 63 61 74 69 6f |AEQuitAp|plicatio|
|00000360| 6e 2c 20 28 45 76 65 6e | 74 48 61 6e 64 6c 65 72 |n, (Even|tHandler|
|00000370| 50 72 6f 63 50 74 72 29 | 48 61 6e 64 6c 65 51 75 |ProcPtr)|HandleQu|
|00000380| 69 74 2c 20 30 2c 20 66 | 61 6c 73 65 29 3b 0d 09 |it, 0, f|alse);..|
|00000390| 09 0d 09 09 2f 2a 20 54 | 68 69 73 20 69 73 20 61 |..../* T|his is a|
|000003a0| 20 22 63 61 74 63 68 2d | 61 6c 6c 22 20 66 6f 72 | "catch-|all" for|
|000003b0| 20 64 65 62 75 67 67 69 | 6e 67 20 2d 2d 20 69 74 | debuggi|ng -- it|
|000003c0| 20 72 65 70 6f 72 74 73 | 20 69 66 20 61 6e 20 65 | reports| if an e|
|000003d0| 76 65 6e 74 20 77 61 73 | 6e 27 74 20 68 61 6e 64 |vent was|n't hand|
|000003e0| 6c 65 64 20 2a 2f 0d 09 | 09 28 76 6f 69 64 29 41 |led */..|.(void)A|
|000003f0| 45 49 6e 73 74 61 6c 6c | 45 76 65 6e 74 48 61 6e |EInstall|EventHan|
|00000400| 64 6c 65 72 28 74 79 70 | 65 57 69 6c 64 43 61 72 |dler(typ|eWildCar|
|00000410| 64 2c 20 20 20 20 74 79 | 70 65 57 69 6c 64 43 61 |d, ty|peWildCa|
|00000420| 72 64 2c 09 09 20 28 45 | 76 65 6e 74 48 61 6e 64 |rd,.. (E|ventHand|
|00000430| 6c 65 72 50 72 6f 63 50 | 74 72 29 4e 6f 74 48 61 |lerProcP|tr)NotHa|
|00000440| 6e 64 6c 65 64 2c 20 30 | 2c 20 66 61 6c 73 65 29 |ndled, 0|, false)|
|00000450| 3b 0d 0d 09 09 2f 2a 20 | 49 6e 73 74 61 6c 6c 20 |;..../* |Install |
|00000460| 6f 75 72 20 65 76 65 6e | 74 20 68 61 6e 64 6c 65 |our even|t handle|
|00000470| 72 73 20 66 6f 72 20 4f | 62 6a 65 63 74 20 4d 6f |rs for O|bject Mo|
|00000480| 64 65 6c 20 41 70 70 6c | 65 20 45 76 65 6e 74 73 |del Appl|e Events|
|00000490| 20 2a 2f 0d 09 09 28 76 | 6f 69 64 29 41 45 49 6e | */...(v|oid)AEIn|
|000004a0| 73 74 61 6c 6c 45 76 65 | 6e 74 48 61 6e 64 6c 65 |stallEve|ntHandle|
|000004b0| 72 28 6b 41 45 43 6f 72 | 65 53 75 69 74 65 2c 09 |r(kAECor|eSuite,.|
|000004c0| 20 74 79 70 65 57 69 6c | 64 43 61 72 64 2c 20 09 | typeWil|dCard, .|
|000004d0| 09 20 28 45 76 65 6e 74 | 48 61 6e 64 6c 65 72 50 |. (Event|HandlerP|
|000004e0| 72 6f 63 50 74 72 29 44 | 69 72 65 63 74 50 61 72 |rocPtr)D|irectPar|
|000004f0| 61 6d 44 69 73 70 61 74 | 63 68 2c 20 30 2c 20 66 |amDispat|ch, 0, f|
|00000500| 61 6c 73 65 29 3b 0d 09 | 09 28 76 6f 69 64 29 41 |alse);..|.(void)A|
|00000510| 45 49 6e 73 74 61 6c 6c | 45 76 65 6e 74 48 61 6e |EInstall|EventHan|
|00000520| 64 6c 65 72 28 6b 41 45 | 43 6f 72 65 53 75 69 74 |dler(kAE|CoreSuit|
|00000530| 65 2c 09 20 6b 41 45 43 | 72 65 61 74 65 45 6c 65 |e,. kAEC|reateEle|
|00000540| 6d 65 6e 74 2c 09 20 28 | 45 76 65 6e 74 48 61 6e |ment,. (|EventHan|
|00000550| 64 6c 65 72 50 72 6f 63 | 50 74 72 29 43 72 65 61 |dlerProc|Ptr)Crea|
|00000560| 74 65 45 6c 65 6d 65 6e | 74 44 69 73 70 61 74 63 |teElemen|tDispatc|
|00000570| 68 2c 20 30 2c 20 66 61 | 6c 73 65 29 3b 0d 09 09 |h, 0, fa|lse);...|
|00000580| 2f 2a 20 49 6e 73 74 61 | 6c 6c 20 74 68 65 20 6f |/* Insta|ll the o|
|00000590| 62 6a 65 63 74 20 61 63 | 63 65 73 73 6f 72 73 20 |bject ac|cessors |
|000005a0| 66 6f 72 20 75 73 65 20 | 77 69 74 68 20 74 68 65 |for use |with the|
|000005b0| 20 4f 62 6a 65 63 74 20 | 53 75 70 70 6f 72 74 20 | Object |Support |
|000005c0| 4c 69 62 72 61 72 79 20 | 2a 2f 0d 09 09 28 76 6f |Library |*/...(vo|
|000005d0| 69 64 29 41 45 49 6e 73 | 74 61 6c 6c 4f 62 6a 65 |id)AEIns|tallObje|
|000005e0| 63 74 41 63 63 65 73 73 | 6f 72 28 27 70 72 6f 70 |ctAccess|or('prop|
|000005f0| 27 2c 20 74 79 70 65 4e | 75 6c 6c 2c 20 28 61 63 |', typeN|ull, (ac|
|00000600| 63 65 73 73 6f 72 50 72 | 6f 63 50 74 72 29 50 72 |cessorPr|ocPtr)Pr|
|00000610| 6f 70 65 72 74 79 46 72 | 6f 6d 4e 75 6c 6c 41 63 |opertyFr|omNullAc|
|00000620| 63 65 73 73 6f 72 2c 20 | 30 2c 20 66 61 6c 73 65 |cessor, |0, false|
|00000630| 29 3b 0d 0d 09 09 28 76 | 6f 69 64 29 41 45 49 6e |);....(v|oid)AEIn|
|00000640| 73 74 61 6c 6c 4f 62 6a | 65 63 74 41 63 63 65 73 |stallObj|ectAcces|
|00000650| 73 6f 72 28 63 57 69 6e | 64 6f 77 2c 20 74 79 70 |sor(cWin|dow, typ|
|00000660| 65 4e 75 6c 6c 2c 20 28 | 61 63 63 65 73 73 6f 72 |eNull, (|accessor|
|00000670| 50 72 6f 63 50 74 72 29 | 57 69 6e 64 6f 77 46 72 |ProcPtr)|WindowFr|
|00000680| 6f 6d 4e 75 6c 6c 41 63 | 63 65 73 73 6f 72 2c 20 |omNullAc|cessor, |
|00000690| 30 2c 20 66 61 6c 73 65 | 29 3b 0d 09 09 28 76 6f |0, false|);...(vo|
|000006a0| 69 64 29 41 45 49 6e 73 | 74 61 6c 6c 4f 62 6a 65 |id)AEIns|tallObje|
|000006b0| 63 74 41 63 63 65 73 73 | 6f 72 28 63 44 6f 63 75 |ctAccess|or(cDocu|
|000006c0| 6d 65 6e 74 2c 20 74 79 | 70 65 4e 75 6c 6c 2c 20 |ment, ty|peNull, |
|000006d0| 28 61 63 63 65 73 73 6f | 72 50 72 6f 63 50 74 72 |(accesso|rProcPtr|
|000006e0| 29 57 69 6e 64 6f 77 46 | 72 6f 6d 4e 75 6c 6c 41 |)WindowF|romNullA|
|000006f0| 63 63 65 73 73 6f 72 2c | 20 30 2c 20 66 61 6c 73 |ccessor,| 0, fals|
|00000700| 65 29 3b 0d 09 09 28 76 | 6f 69 64 29 41 45 49 6e |e);...(v|oid)AEIn|
|00000710| 73 74 61 6c 6c 4f 62 6a | 65 63 74 41 63 63 65 73 |stallObj|ectAcces|
|00000720| 73 6f 72 28 74 79 70 65 | 50 72 6f 70 65 72 74 79 |sor(type|Property|
|00000730| 2c 20 63 44 6f 63 75 6d | 65 6e 74 2c 20 28 61 63 |, cDocum|ent, (ac|
|00000740| 63 65 73 73 6f 72 50 72 | 6f 63 50 74 72 29 50 72 |cessorPr|ocPtr)Pr|
|00000750| 6f 70 65 72 74 79 46 72 | 6f 6d 57 69 6e 64 6f 77 |opertyFr|omWindow|
|00000760| 41 63 63 65 73 73 6f 72 | 2c 20 30 2c 20 66 61 6c |Accessor|, 0, fal|
|00000770| 73 65 29 3b 0d 09 09 28 | 76 6f 69 64 29 41 45 49 |se);...(|void)AEI|
|00000780| 6e 73 74 61 6c 6c 4f 62 | 6a 65 63 74 41 63 63 65 |nstallOb|jectAcce|
|00000790| 73 73 6f 72 28 74 79 70 | 65 50 72 6f 70 65 72 74 |ssor(typ|ePropert|
|000007a0| 79 2c 20 74 79 70 65 4e | 75 6c 6c 2c 20 28 61 63 |y, typeN|ull, (ac|
|000007b0| 63 65 73 73 6f 72 50 72 | 6f 63 50 74 72 29 50 72 |cessorPr|ocPtr)Pr|
|000007c0| 6f 70 65 72 74 79 46 72 | 6f 6d 4e 75 6c 6c 41 63 |opertyFr|omNullAc|
|000007d0| 63 65 73 73 6f 72 2c 20 | 30 2c 20 66 61 6c 73 65 |cessor, |0, false|
|000007e0| 29 3b 0d 09 09 0d 09 09 | 28 76 6f 69 64 29 41 45 |);......|(void)AE|
|000007f0| 49 6e 73 74 61 6c 6c 4f | 62 6a 65 63 74 41 63 63 |InstallO|bjectAcc|
|00000800| 65 73 73 6f 72 28 63 45 | 6e 74 72 79 2c 20 63 44 |essor(cE|ntry, cD|
|00000810| 6f 63 75 6d 65 6e 74 2c | 20 28 61 63 63 65 73 73 |ocument,| (access|
|00000820| 6f 72 50 72 6f 63 50 74 | 72 29 45 6e 74 72 79 46 |orProcPt|r)EntryF|
|00000830| 72 6f 6d 44 6f 63 75 6d | 65 6e 74 41 63 63 65 73 |romDocum|entAcces|
|00000840| 73 6f 72 2c 20 30 2c 20 | 66 61 6c 73 65 29 3b 0d |sor, 0, |false);.|
|00000850| 09 09 28 76 6f 69 64 29 | 41 45 49 6e 73 74 61 6c |..(void)|AEInstal|
|00000860| 6c 4f 62 6a 65 63 74 41 | 63 63 65 73 73 6f 72 28 |lObjectA|ccessor(|
|00000870| 63 53 63 72 61 70 49 74 | 65 6d 2c 20 63 45 6e 74 |cScrapIt|em, cEnt|
|00000880| 72 79 2c 20 28 61 63 63 | 65 73 73 6f 72 50 72 6f |ry, (acc|essorPro|
|00000890| 63 50 74 72 29 49 74 65 | 6d 46 72 6f 6d 45 6e 74 |cPtr)Ite|mFromEnt|
|000008a0| 72 79 41 63 63 65 73 73 | 6f 72 2c 20 30 2c 20 66 |ryAccess|or, 0, f|
|000008b0| 61 6c 73 65 29 3b 0d 09 | 09 28 76 6f 69 64 29 41 |alse);..|.(void)A|
|000008c0| 45 49 6e 73 74 61 6c 6c | 4f 62 6a 65 63 74 41 63 |EInstall|ObjectAc|
|000008d0| 63 65 73 73 6f 72 28 74 | 79 70 65 50 72 6f 70 65 |cessor(t|ypePrope|
|000008e0| 72 74 79 2c 20 63 45 6e | 74 72 79 2c 20 28 61 63 |rty, cEn|try, (ac|
|000008f0| 63 65 73 73 6f 72 50 72 | 6f 63 50 74 72 29 50 72 |cessorPr|ocPtr)Pr|
|00000900| 6f 70 65 72 74 79 46 72 | 6f 6d 45 6e 74 72 79 41 |opertyFr|omEntryA|
|00000910| 63 63 65 73 73 6f 72 2c | 20 30 2c 20 66 61 6c 73 |ccessor,| 0, fals|
|00000920| 65 29 3b 0d 09 09 28 76 | 6f 69 64 29 41 45 49 6e |e);...(v|oid)AEIn|
|00000930| 73 74 61 6c 6c 4f 62 6a | 65 63 74 41 63 63 65 73 |stallObj|ectAcces|
|00000940| 73 6f 72 28 74 79 70 65 | 50 72 6f 70 65 72 74 79 |sor(type|Property|
|00000950| 2c 20 63 53 63 72 61 70 | 49 74 65 6d 2c 20 28 61 |, cScrap|Item, (a|
|00000960| 63 63 65 73 73 6f 72 50 | 72 6f 63 50 74 72 29 50 |ccessorP|rocPtr)P|
|00000970| 72 6f 70 65 72 74 79 46 | 72 6f 6d 49 74 65 6d 41 |ropertyF|romItemA|
|00000980| 63 63 65 73 73 6f 72 2c | 20 30 2c 20 66 61 6c 73 |ccessor,| 0, fals|
|00000990| 65 29 3b 0d 09 7d 0d 7d | 20 2f 2a 20 69 6e 69 74 |e);..}.}| /* init|
|000009a0| 5f 61 70 70 6c 65 5f 65 | 76 65 6e 74 73 5f 68 6f |_apple_e|vents_ho|
|000009b0| 6f 6b 20 2a 2f 0d 0d 0d | 63 68 61 72 09 2a 4f 53 |ok */...|char.*OS|
|000009c0| 54 79 70 65 54 6f 50 53 | 74 72 28 4f 53 54 79 70 |TypeToPS|tr(OSTyp|
|000009d0| 65 20 74 68 65 54 79 70 | 65 2c 20 63 68 61 72 20 |e theTyp|e, char |
|000009e0| 2a 73 29 0d 2f 2a 20 54 | 68 69 73 20 69 73 20 61 |*s)./* T|his is a|
|000009f0| 20 75 73 65 66 75 6c 20 | 64 65 62 75 67 67 69 6e | useful |debuggin|
|00000a00| 67 20 74 6f 6f 6c 20 61 | 73 20 69 74 20 61 6c 6c |g tool a|s it all|
|00000a10| 6f 77 73 20 75 73 20 74 | 6f 20 70 75 74 20 61 6e |ows us t|o put an|
|00000a20| 20 45 76 65 6e 74 49 44 | 20 6f 72 20 45 76 65 6e | EventID| or Even|
|00000a30| 74 49 44 20 2a 2f 0d 2f | 2a 20 69 6e 74 6f 20 61 |tID */./|* into a|
|00000a40| 20 73 74 72 69 6e 67 20 | 73 6f 20 77 65 20 63 61 | string |so we ca|
|00000a50| 6e 20 64 69 73 70 6c 61 | 79 20 69 74 20 69 6e 20 |n displa|y it in |
|00000a60| 61 20 64 69 61 6c 6f 67 | 20 2a 2f 0d 7b 0d 09 2a |a dialog| */.{..*|
|00000a70| 73 20 3d 20 30 78 30 34 | 3b 0d 09 42 6c 6f 63 6b |s = 0x04|;..Block|
|00000a80| 4d 6f 76 65 28 26 74 68 | 65 54 79 70 65 2c 20 26 |Move(&th|eType, &|
|00000a90| 73 5b 31 5d 2c 20 34 29 | 3b 09 2f 2a 20 55 73 65 |s[1], 4)|;./* Use|
|00000aa0| 20 42 6c 6f 63 6b 4d 6f | 76 65 20 74 6f 20 61 76 | BlockMo|ve to av|
|00000ab0| 6f 69 64 20 6f 64 64 20 | 61 64 64 72 65 73 73 20 |oid odd |address |
|00000ac0| 65 72 72 6f 72 20 6f 6e | 20 36 38 30 30 30 20 6d |error on| 68000 m|
|00000ad0| 61 63 68 69 6e 65 73 20 | 2a 2f 0d 09 72 65 74 75 |achines |*/..retu|
|00000ae0| 72 6e 20 73 3b 0d 7d 0d | 0d 70 61 73 63 61 6c 20 |rn s;.}.|.pascal |
|00000af0| 4f 53 45 72 72 20 4e 6f | 74 48 61 6e 64 6c 65 64 |OSErr No|tHandled|
|00000b00| 20 28 41 45 44 65 73 63 | 4c 69 73 74 20 2a 61 65 | (AEDesc|List *ae|
|00000b10| 76 74 2c 20 41 45 44 65 | 73 63 4c 69 73 74 20 2a |vt, AEDe|scList *|
|00000b20| 72 65 70 6c 79 2c 20 6c | 6f 6e 67 20 72 65 66 43 |reply, l|ong refC|
|00000b30| 6f 6e 29 0d 2f 2a 20 54 | 68 69 73 20 72 6f 75 74 |on)./* T|his rout|
|00000b40| 69 6e 65 20 69 73 20 63 | 61 6c 6c 65 64 20 66 6f |ine is c|alled fo|
|00000b50| 72 20 61 6e 79 20 75 6e | 6b 6e 6f 77 6e 20 65 76 |r any un|known ev|
|00000b60| 65 6e 74 73 20 74 68 61 | 74 20 63 6f 6d 65 20 69 |ents tha|t come i|
|00000b70| 6e 20 28 69 74 27 73 20 | 69 6e 73 74 61 6c 6c 65 |n (it's |installe|
|00000b80| 64 20 69 6e 74 6f 20 74 | 68 65 20 2a 2f 0d 2f 2a |d into t|he */./*|
|00000b90| 20 74 61 62 6c 65 20 77 | 69 74 68 20 77 69 6c 64 | table w|ith wild|
|00000ba0| 2d 63 61 72 64 20 68 61 | 6e 64 6c 65 72 73 29 20 |-card ha|ndlers) |
|00000bb0| 61 6e 64 20 69 74 20 77 | 69 6c 6c 20 70 75 74 20 |and it w|ill put |
|00000bc0| 75 70 20 61 20 64 69 61 | 6c 6f 67 20 74 68 61 74 |up a dia|log that|
|00000bd0| 20 6c 65 74 73 20 75 73 | 20 6b 6e 6f 77 20 74 68 | lets us| know th|
|00000be0| 61 74 20 61 20 2a 2f 0d | 2f 2a 20 22 62 61 64 22 |at a */.|/* "bad"|
|00000bf0| 20 41 70 70 6c 65 20 65 | 76 65 6e 74 20 68 61 73 | Apple e|vent has|
|00000c00| 20 63 6f 6d 65 20 69 6e | 2e 20 2a 2f 0d 7b 0d 09 | come in|. */.{..|
|00000c10| 4f 53 45 72 72 09 65 72 | 72 3b 0d 09 4f 53 54 79 |OSErr.er|r;..OSTy|
|00000c20| 70 65 09 65 76 65 6e 74 | 43 6c 61 73 73 2c 20 65 |pe.event|Class, e|
|00000c30| 76 65 6e 74 49 44 3b 0d | 09 4f 53 54 79 70 65 09 |ventID;.|.OSType.|
|00000c40| 74 79 70 65 43 6f 64 65 | 3b 0d 09 63 68 61 72 09 |typeCode|;..char.|
|00000c50| 73 63 72 61 74 63 68 43 | 6c 61 73 73 5b 35 5d 2c |scratchC|lass[5],|
|00000c60| 20 73 63 72 61 74 63 68 | 49 44 5b 35 5d 3b 0d 09 | scratch|ID[5];..|
|00000c70| 53 69 7a 65 09 61 63 74 | 75 61 6c 53 69 7a 65 3b |Size.act|ualSize;|
|00000c80| 0d 09 73 68 6f 72 74 09 | 69 74 65 6d 48 69 74 3b |..short.|itemHit;|
|00000c90| 0d 09 0d 09 41 45 44 65 | 73 63 09 64 69 72 65 63 |....AEDe|sc.direc|
|00000ca0| 74 50 61 72 61 6d 3b 0d | 09 0d 0d 09 65 72 72 20 |tParam;.|....err |
|00000cb0| 3d 20 4d 79 49 6e 74 65 | 72 61 63 74 57 69 74 68 |= MyInte|ractWith|
|00000cc0| 55 73 65 72 28 54 52 55 | 45 29 3b 09 2f 2a 20 54 |User(TRU|E);./* T|
|00000cd0| 65 6c 6c 20 74 68 65 20 | 75 73 65 72 20 69 74 27 |ell the |user it'|
|00000ce0| 73 20 75 72 67 65 6e 74 | 20 2a 2f 0d 09 69 66 20 |s urgent| */..if |
|00000cf0| 28 65 72 72 20 3d 3d 20 | 6e 6f 45 72 72 29 20 7b |(err == |noErr) {|
|00000d00| 0d 09 09 41 45 47 65 74 | 41 74 74 72 69 62 75 74 |...AEGet|Attribut|
|00000d10| 65 50 74 72 28 61 65 76 | 74 2c 20 6b 65 79 45 76 |ePtr(aev|t, keyEv|
|00000d20| 65 6e 74 43 6c 61 73 73 | 41 74 74 72 2c 20 74 79 |entClass|Attr, ty|
|00000d30| 70 65 54 79 70 65 2c 20 | 26 74 79 70 65 43 6f 64 |peType, |&typeCod|
|00000d40| 65 2c 20 28 50 74 72 29 | 26 65 76 65 6e 74 43 6c |e, (Ptr)|&eventCl|
|00000d50| 61 73 73 2c 20 73 69 7a | 65 6f 66 28 65 76 65 6e |ass, siz|eof(even|
|00000d60| 74 43 6c 61 73 73 29 2c | 20 26 61 63 74 75 61 6c |tClass),| &actual|
|00000d70| 53 69 7a 65 29 3b 0d 09 | 09 41 45 47 65 74 41 74 |Size);..|.AEGetAt|
|00000d80| 74 72 69 62 75 74 65 50 | 74 72 28 61 65 76 74 2c |tributeP|tr(aevt,|
|00000d90| 20 6b 65 79 45 76 65 6e | 74 49 44 41 74 74 72 2c | keyEven|tIDAttr,|
|00000da0| 20 74 79 70 65 54 79 70 | 65 2c 20 26 74 79 70 65 | typeTyp|e, &type|
|00000db0| 43 6f 64 65 2c 20 28 50 | 74 72 29 26 65 76 65 6e |Code, (P|tr)&even|
|00000dc0| 74 49 44 2c 20 20 20 20 | 73 69 7a 65 6f 66 28 65 |tID, |sizeof(e|
|00000dd0| 76 65 6e 74 49 44 29 2c | 20 20 20 20 26 61 63 74 |ventID),| &act|
|00000de0| 75 61 6c 53 69 7a 65 29 | 3b 0d 09 09 50 61 72 61 |ualSize)|;...Para|
|00000df0| 6d 54 65 78 74 28 28 76 | 6f 69 64 20 2a 29 4f 53 |mText((v|oid *)OS|
|00000e00| 54 79 70 65 54 6f 50 53 | 74 72 28 65 76 65 6e 74 |TypeToPS|tr(event|
|00000e10| 43 6c 61 73 73 2c 20 73 | 63 72 61 74 63 68 43 6c |Class, s|cratchCl|
|00000e20| 61 73 73 29 2c 20 28 76 | 6f 69 64 20 2a 29 4f 53 |ass), (v|oid *)OS|
|00000e30| 54 79 70 65 54 6f 50 53 | 74 72 28 65 76 65 6e 74 |TypeToPS|tr(event|
|00000e40| 49 44 2c 20 73 63 72 61 | 74 63 68 49 44 29 2c 20 |ID, scra|tchID), |
|00000e50| 28 76 6f 69 64 20 2a 29 | 22 22 2c 20 28 76 6f 69 |(void *)|"", (voi|
|00000e60| 64 20 2a 29 22 22 29 3b | 0d 09 09 69 74 65 6d 48 |d *)"");|...itemH|
|00000e70| 69 74 20 3d 20 41 6c 65 | 72 74 28 31 30 30 32 2c |it = Ale|rt(1002,|
|00000e80| 20 30 4c 29 3b 0d 09 7d | 0d 09 72 65 74 75 72 6e | 0L);..}|..return|
|00000e90| 20 65 72 72 41 45 45 76 | 65 6e 74 4e 6f 74 48 61 | errAEEv|entNotHa|
|00000ea0| 6e 64 6c 65 64 3b 0d 7d | 20 2f 2a 20 4e 6f 74 48 |ndled;.}| /* NotH|
|00000eb0| 61 6e 64 6c 65 64 20 2a | 2f 0d 0d 0d 70 61 73 63 |andled *|/...pasc|
|00000ec0| 61 6c 20 4f 53 45 72 72 | 20 48 61 6e 64 6c 65 4f |al OSErr| HandleO|
|00000ed0| 61 70 70 20 28 41 45 44 | 65 73 63 4c 69 73 74 20 |app (AED|escList |
|00000ee0| 2a 61 65 76 74 2c 20 41 | 45 44 65 73 63 4c 69 73 |*aevt, A|EDescLis|
|00000ef0| 74 20 2a 72 65 70 6c 79 | 2c 20 6c 6f 6e 67 20 72 |t *reply|, long r|
|00000f00| 65 66 43 6f 6e 29 0d 7b | 0d 09 2f 2a 20 46 69 6e |efCon).{|../* Fin|
|00000f10| 64 20 74 68 65 20 73 74 | 61 6e 64 61 72 64 20 53 |d the st|andard S|
|00000f20| 63 72 61 70 62 6f 6f 6b | 20 46 69 6c 65 20 61 6e |crapbook| File an|
|00000f30| 64 20 6f 70 65 6e 20 69 | 74 20 2a 2f 0d 09 2f 2a |d open i|t */../*|
|00000f40| 20 49 74 27 73 20 63 61 | 6c 6c 65 64 20 22 53 63 | It's ca|lled "Sc|
|00000f50| 72 61 70 62 6f 6f 6b 20 | 66 69 6c 65 22 20 61 6e |rapbook |file" an|
|00000f60| 64 20 69 73 20 6c 6f 63 | 61 74 65 64 20 69 6e 20 |d is loc|ated in |
|00000f70| 74 68 65 20 53 79 73 74 | 65 6d 20 66 6f 6c 64 65 |the Syst|em folde|
|00000f80| 72 20 2a 2f 0d 09 0d 09 | 4f 53 45 72 72 09 65 72 |r */....|OSErr.er|
|00000f90| 72 3b 0d 09 46 53 53 70 | 65 63 09 73 63 72 61 70 |r;..FSSp|ec.scrap|
|00000fa0| 62 6f 6f 6b 46 69 6c 65 | 3b 0d 09 53 74 72 36 33 |bookFile|;..Str63|
|00000fb0| 09 66 69 6c 65 4e 61 6d | 65 20 3d 20 22 5c 70 53 |.fileNam|e = "\pS|
|00000fc0| 63 72 61 70 62 6f 6f 6b | 20 46 69 6c 65 22 3b 0d |crapbook| File";.|
|00000fd0| 0d 09 2f 2a 20 4c 6f 63 | 61 74 65 20 74 68 65 20 |../* Loc|ate the |
|00000fe0| 73 79 73 74 65 6d 20 66 | 6f 6c 64 65 72 20 2a 2f |system f|older */|
|00000ff0| 0d 09 65 72 72 20 3d 20 | 46 69 6e 64 46 6f 6c 64 |..err = |FindFold|
|00001000| 65 72 28 6b 4f 6e 53 79 | 73 74 65 6d 44 69 73 6b |er(kOnSy|stemDisk|
|00001010| 2c 6b 53 79 73 74 65 6d | 46 6f 6c 64 65 72 54 79 |,kSystem|FolderTy|
|00001020| 70 65 2c 66 61 6c 73 65 | 2c 20 26 73 63 72 61 70 |pe,false|, &scrap|
|00001030| 62 6f 6f 6b 46 69 6c 65 | 2e 76 52 65 66 4e 75 6d |bookFile|.vRefNum|
|00001040| 2c 20 26 73 63 72 61 70 | 62 6f 6f 6b 46 69 6c 65 |, &scrap|bookFile|
|00001050| 2e 70 61 72 49 44 29 3b | 0d 09 69 66 20 28 65 72 |.parID);|..if (er|
|00001060| 72 20 3d 3d 20 6e 6f 45 | 72 72 29 20 7b 0d 09 09 |r == noE|rr) {...|
|00001070| 2f 2a 20 53 65 74 20 74 | 68 65 20 66 69 6c 65 27 |/* Set t|he file'|
|00001080| 73 20 6e 61 6d 65 20 74 | 6f 20 22 53 63 72 61 70 |s name t|o "Scrap|
|00001090| 62 6f 6f 6b 20 66 69 6c | 65 22 20 2a 2f 0d 09 09 |book fil|e" */...|
|000010a0| 42 6c 6f 63 6b 4d 6f 76 | 65 28 66 69 6c 65 4e 61 |BlockMov|e(fileNa|
|000010b0| 6d 65 2c 20 26 73 63 72 | 61 70 62 6f 6f 6b 46 69 |me, &scr|apbookFi|
|000010c0| 6c 65 2e 6e 61 6d 65 2c | 20 66 69 6c 65 4e 61 6d |le.name,| fileNam|
|000010d0| 65 5b 30 5d 20 2b 20 31 | 29 3b 0d 09 09 2f 2a 20 |e[0] + 1|);.../* |
|000010e0| 4f 70 65 6e 20 61 20 77 | 69 6e 64 6f 77 20 63 6f |Open a w|indow co|
|000010f0| 6e 74 61 69 6e 69 6e 67 | 20 74 68 69 73 20 66 69 |ntaining| this fi|
|00001100| 6c 65 20 2a 2f 0d 09 09 | 65 72 72 20 3d 20 4e 65 |le */...|err = Ne|
|00001110| 77 44 69 73 70 6c 61 79 | 57 69 6e 64 6f 77 28 26 |wDisplay|Window(&|
|00001120| 73 63 72 61 70 62 6f 6f | 6b 46 69 6c 65 29 3b 0d |scrapboo|kFile);.|
|00001130| 09 7d 09 0d 09 72 65 74 | 75 72 6e 20 65 72 72 3b |.}...ret|urn err;|
|00001140| 0d 7d 20 2f 2a 20 4e 6f | 74 48 61 6e 64 6c 65 64 |.} /* No|tHandled|
|00001150| 20 2a 2f 0d 0d 0d 70 61 | 73 63 61 6c 20 4f 53 45 | */...pa|scal OSE|
|00001160| 72 72 20 48 61 6e 64 6c | 65 4f 64 6f 63 20 28 41 |rr Handl|eOdoc (A|
|00001170| 45 44 65 73 63 4c 69 73 | 74 20 2a 61 65 76 74 2c |EDescLis|t *aevt,|
|00001180| 20 41 45 44 65 73 63 4c | 69 73 74 20 2a 72 65 70 | AEDescL|ist *rep|
|00001190| 6c 79 2c 20 6c 6f 6e 67 | 20 72 65 66 43 6f 6e 29 |ly, long| refCon)|
|000011a0| 0d 7b 0d 09 41 45 44 65 | 73 63 09 09 66 69 6c 65 |.{..AEDe|sc..file|
|000011b0| 4c 69 73 74 44 65 73 63 | 3b 0d 09 6c 6f 6e 67 09 |ListDesc|;..long.|
|000011c0| 09 6e 75 6d 46 69 6c 65 | 73 3b 0d 09 44 65 73 63 |.numFile|s;..Desc|
|000011d0| 54 79 70 65 09 61 63 74 | 75 61 6c 54 79 70 65 3b |Type.act|ualType;|
|000011e0| 0d 09 6c 6f 6e 67 09 09 | 61 63 74 75 61 6c 53 69 |..long..|actualSi|
|000011f0| 7a 65 3b 0d 09 41 45 4b | 65 79 77 6f 72 64 09 61 |ze;..AEK|eyword.a|
|00001200| 63 74 75 61 6c 4b 65 79 | 77 6f 72 64 3b 0d 09 46 |ctualKey|word;..F|
|00001210| 53 53 70 65 63 09 09 6f | 6e 65 46 69 6c 65 3b 0d |SSpec..o|neFile;.|
|00001220| 09 6c 6f 6e 67 09 09 69 | 6e 64 65 78 3b 0d 09 4f |.long..i|ndex;..O|
|00001230| 53 45 72 72 09 09 65 72 | 72 3b 0d 09 09 09 09 09 |SErr..er|r;......|
|00001240| 09 0d 09 2f 2a 20 54 68 | 65 20 22 6f 64 6f 63 22 |.../* Th|e "odoc"|
|00001250| 20 61 6e 64 20 22 70 64 | 6f 63 22 20 6d 65 73 73 | and "pd|oc" mess|
|00001260| 61 67 65 73 20 63 6f 6e | 74 61 69 6e 20 61 20 6c |ages con|tain a l|
|00001270| 69 73 74 20 6f 66 20 61 | 6c 69 61 73 65 73 20 61 |ist of a|liases a|
|00001280| 73 20 74 68 65 20 64 69 | 72 65 63 74 20 70 61 72 |s the di|rect par|
|00001290| 61 6d 61 74 65 72 2e 20 | 20 2a 2f 0d 09 2f 2a 20 |amater. | */../* |
|000012a0| 54 68 69 73 20 6d 65 61 | 6e 73 20 74 68 61 74 20 |This mea|ns that |
|000012b0| 77 65 27 6c 6c 20 6e 65 | 65 64 20 74 6f 20 65 78 |we'll ne|ed to ex|
|000012c0| 74 72 61 63 74 20 74 68 | 65 20 6c 69 73 74 2c 20 |tract th|e list, |
|000012d0| 63 6f 75 6e 74 20 74 68 | 65 20 6c 69 73 74 27 73 |count th|e list's|
|000012e0| 20 65 6c 65 6d 65 6e 74 | 73 2c 20 61 6e 64 20 20 | element|s, and |
|000012f0| 20 20 20 2a 2f 0d 09 2f | 2a 20 74 68 65 6e 20 70 | */../|* then p|
|00001300| 72 6f 63 65 73 73 20 65 | 61 63 68 20 66 69 6c 65 |rocess e|ach file|
|00001310| 20 69 6e 20 74 75 72 6e | 2e 09 09 09 09 09 09 09 | in turn|........|
|00001320| 09 09 09 09 09 09 09 09 | 09 09 09 09 09 09 09 09 |........|........|
|00001330| 09 09 09 20 2a 2f 0d 09 | 0d 09 2f 2a 20 45 78 74 |... */..|../* Ext|
|00001340| 72 61 63 74 20 74 68 65 | 20 6c 69 73 74 20 6f 66 |ract the| list of|
|00001350| 20 61 6c 69 61 73 65 73 | 20 69 6e 74 6f 20 66 69 | aliases| into fi|
|00001360| 6c 65 4c 69 73 74 44 65 | 73 63 20 2a 2f 0d 09 65 |leListDe|sc */..e|
|00001370| 72 72 20 3d 20 41 45 47 | 65 74 4b 65 79 44 65 73 |rr = AEG|etKeyDes|
|00001380| 63 28 20 61 65 76 74 2c | 20 6b 65 79 44 69 72 65 |c( aevt,| keyDire|
|00001390| 63 74 4f 62 6a 65 63 74 | 2c 20 74 79 70 65 41 45 |ctObject|, typeAE|
|000013a0| 4c 69 73 74 2c 20 26 66 | 69 6c 65 4c 69 73 74 44 |List, &f|ileListD|
|000013b0| 65 73 63 20 29 3b 0d 09 | 69 66 20 28 65 72 72 29 |esc );..|if (err)|
|000013c0| 20 72 65 74 75 72 6e 20 | 65 72 72 3b 0d 09 09 0d | return |err;....|
|000013d0| 09 2f 2a 20 43 6f 75 6e | 74 20 74 68 65 20 6c 69 |./* Coun|t the li|
|000013e0| 73 74 20 65 6c 65 6d 65 | 6e 74 73 20 2a 2f 0d 09 |st eleme|nts */..|
|000013f0| 65 72 72 20 3d 20 41 45 | 43 6f 75 6e 74 49 74 65 |err = AE|CountIte|
|00001400| 6d 73 28 20 26 66 69 6c | 65 4c 69 73 74 44 65 73 |ms( &fil|eListDes|
|00001410| 63 2c 20 26 6e 75 6d 46 | 69 6c 65 73 29 3b 0d 09 |c, &numF|iles);..|
|00001420| 69 66 20 28 65 72 72 29 | 20 72 65 74 75 72 6e 20 |if (err)| return |
|00001430| 65 72 72 3b 0d 09 09 09 | 09 0d 09 2f 2a 20 6e 6f |err;....|.../* no|
|00001440| 77 20 67 65 74 20 65 61 | 63 68 20 66 69 6c 65 20 |w get ea|ch file |
|00001450| 66 72 6f 6d 20 74 68 65 | 20 6c 69 73 74 20 61 6e |from the| list an|
|00001460| 64 20 70 72 6f 63 65 73 | 73 20 69 74 2e 20 2a 2f |d proces|s it. */|
|00001470| 0d 09 2f 2a 20 45 76 65 | 6e 20 74 68 6f 75 67 68 |../* Eve|n though|
|00001480| 20 74 68 65 20 65 76 65 | 6e 74 20 63 6f 6e 74 61 | the eve|nt conta|
|00001490| 69 6e 73 20 61 20 6c 69 | 73 74 20 6f 66 20 61 6c |ins a li|st of al|
|000014a0| 69 73 65 73 2c 20 74 68 | 65 20 41 70 70 6c 65 20 |ises, th|e Apple |
|000014b0| 45 76 65 6e 74 20 4d 61 | 6e 61 67 65 72 20 2a 2f |Event Ma|nager */|
|000014c0| 0d 09 2f 2a 20 77 69 6c | 6c 20 63 6f 6e 76 65 72 |../* wil|l conver|
|000014d0| 74 20 65 61 63 68 20 61 | 6c 69 61 73 20 74 6f 20 |t each a|lias to |
|000014e0| 61 6e 20 46 53 53 70 65 | 63 20 69 66 20 77 65 20 |an FSSpe|c if we |
|000014f0| 61 73 6b 20 69 74 20 74 | 6f 2e 20 2a 2f 0d 09 66 |ask it t|o. */..f|
|00001500| 6f 72 20 28 69 6e 64 65 | 78 20 3d 20 31 3b 20 69 |or (inde|x = 1; i|
|00001510| 6e 64 65 78 20 3c 3d 20 | 6e 75 6d 46 69 6c 65 73 |ndex <= |numFiles|
|00001520| 3b 20 69 6e 64 65 78 20 | 2b 2b 29 20 7b 0d 09 09 |; index |++) {...|
|00001530| 65 72 72 20 3d 20 41 45 | 47 65 74 4e 74 68 50 74 |err = AE|GetNthPt|
|00001540| 72 28 20 26 66 69 6c 65 | 4c 69 73 74 44 65 73 63 |r( &file|ListDesc|
|00001550| 2c 20 69 6e 64 65 78 2c | 20 74 79 70 65 46 53 53 |, index,| typeFSS|
|00001560| 2c 20 26 61 63 74 75 61 | 6c 4b 65 79 77 6f 72 64 |, &actua|lKeyword|
|00001570| 2c 0d 09 09 09 09 09 09 | 09 26 61 63 74 75 61 6c |,.......|.&actual|
|00001580| 54 79 70 65 2c 20 28 50 | 74 72 29 26 6f 6e 65 46 |Type, (P|tr)&oneF|
|00001590| 69 6c 65 2c 20 73 69 7a | 65 6f 66 28 6f 6e 65 46 |ile, siz|eof(oneF|
|000015a0| 69 6c 65 29 2c 20 26 61 | 63 74 75 61 6c 53 69 7a |ile), &a|ctualSiz|
|000015b0| 65 29 3b 0d 09 09 69 66 | 20 28 65 72 72 29 20 7b |e);...if| (err) {|
|000015c0| 0d 09 09 09 41 45 44 69 | 73 70 6f 73 65 44 65 73 |....AEDi|sposeDes|
|000015d0| 63 28 26 66 69 6c 65 4c | 69 73 74 44 65 73 63 20 |c(&fileL|istDesc |
|000015e0| 29 3b 0d 09 09 09 72 65 | 74 75 72 6e 20 65 72 72 |);....re|turn err|
|000015f0| 3b 0d 09 09 7d 0d 09 09 | 0d 09 09 4e 65 77 44 69 |;...}...|...NewDi|
|00001600| 73 70 6c 61 79 57 69 6e | 64 6f 77 28 26 6f 6e 65 |splayWin|dow(&one|
|00001610| 46 69 6c 65 29 3b 0d 09 | 7d 0d 09 72 65 74 75 72 |File);..|}..retur|
|00001620| 6e 20 6e 6f 45 72 72 3b | 0d 7d 20 2f 2a 20 48 61 |n noErr;|.} /* Ha|
|00001630| 6e 64 6c 65 4f 64 6f 63 | 20 2a 2f 0d 0d 0d 70 61 |ndleOdoc| */...pa|
|00001640| 73 63 61 6c 20 4f 53 45 | 72 72 20 48 61 6e 64 6c |scal OSE|rr Handl|
|00001650| 65 50 64 6f 63 20 28 41 | 45 44 65 73 63 4c 69 73 |ePdoc (A|EDescLis|
|00001660| 74 20 2a 61 65 76 74 2c | 20 41 45 44 65 73 63 4c |t *aevt,| AEDescL|
|00001670| 69 73 74 20 2a 72 65 70 | 6c 79 2c 20 6c 6f 6e 67 |ist *rep|ly, long|
|00001680| 20 72 65 66 43 6f 6e 29 | 0d 7b 0d 09 72 65 74 75 | refCon)|.{..retu|
|00001690| 72 6e 20 65 72 72 41 45 | 45 76 65 6e 74 4e 6f 74 |rn errAE|EventNot|
|000016a0| 48 61 6e 64 6c 65 64 3b | 09 2f 2a 20 57 65 20 64 |Handled;|./* We d|
|000016b0| 6f 6e 27 74 20 64 6f 20 | 70 72 69 6e 74 69 6e 67 |on't do |printing|
|000016c0| c9 20 2a 2f 0d 7d 20 2f | 2a 20 48 61 6e 64 6c 65 |. */.} /|* Handle|
|000016d0| 50 64 6f 63 20 2a 2f 0d | 0d 0d 70 61 73 63 61 6c |Pdoc */.|..pascal|
|000016e0| 20 4f 53 45 72 72 20 48 | 61 6e 64 6c 65 51 75 69 | OSErr H|andleQui|
|000016f0| 74 20 28 41 45 44 65 73 | 63 4c 69 73 74 20 2a 61 |t (AEDes|cList *a|
|00001700| 65 76 74 2c 20 41 45 44 | 65 73 63 4c 69 73 74 20 |evt, AED|escList |
|00001710| 2a 72 65 70 6c 79 2c 20 | 6c 6f 6e 67 20 72 65 66 |*reply, |long ref|
|00001720| 43 6f 6e 29 0d 7b 0d 09 | 67 44 6f 6e 65 20 3d 20 |Con).{..|gDone = |
|00001730| 54 52 55 45 3b 0d 09 72 | 65 74 75 72 6e 20 6e 6f |TRUE;..r|eturn no|
|00001740| 45 72 72 3b 0d 7d 20 2f | 2a 20 4e 6f 74 48 61 6e |Err;.} /|* NotHan|
|00001750| 64 6c 65 64 20 2a 2f 0d | 00 00 00 00 00 00 00 00 |dled */.|........|
|00001760| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001770| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001780| 00 00 01 00 00 00 01 a2 | 00 00 00 a2 00 00 00 32 |........|.......2|
|00001790| 09 09 65 72 72 20 3d 20 | 6c 61 62 5f 57 72 69 74 |..err = |lab_Writ|
|000017a0| 65 54 6f 6b 65 6e 44 61 | 74 61 28 74 6f 6b 65 6e |eTokenDa|ta(token|
|000017b0| 14 41 70 70 6c 65 45 76 | 65 6e 74 48 61 6e 64 6c |.AppleEv|entHandl|
|000017c0| 65 72 73 2e 63 76 02 00 | 00 00 54 45 58 54 4b 41 |ers.cv..|..TEXTKA|
|000017d0| 00 00 54 45 58 54 4b 41 | 48 4c 01 00 ff fa 01 09 |..TEXTKA|HL......|
|000017e0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000017f0| 00 00 a4 7e a2 5c 00 00 | 16 d8 00 00 01 d4 20 2a |...~.\..|...... *|
|00001800| 2f 0d 0d 0d 4f 53 45 72 | 72 20 6c 61 62 5f 43 72 |/...OSEr|r lab_Cr|
|00001810| 65 61 74 65 45 6c 65 6d | 65 6e 74 28 41 70 70 6c |eateElem|ent(Appl|
|00001820| 65 45 76 65 6e 74 20 2a | 6d 65 73 73 61 67 65 2c |eEvent *|message,|
|00001830| 20 41 70 70 6c 65 45 76 | 65 6e 74 20 2a 72 65 70 | AppleEv|ent *rep|
|00001840| 6c 79 2c 20 44 65 73 63 | 54 79 70 65 20 69 6e 73 |ly, Desc|Type ins|
|00001850| 65 72 74 69 6f 6e 50 6f | 73 2c 20 2f 2a 20 3c 2d |ertionPo|s, /* <-|
|00001860| 20 74 68 69 73 20 69 73 | 20 6e 6f 72 6d 61 6c 6c | this is| normall|
|00001870| 79 20 74 68 65 20 72 65 | 66 43 6f 6e 20 2a 2f 0d |y the re|fCon */.|
|00001880| 00 00 00 9e 00 07 00 00 | 0e 49 00 00 0e 53 0b 48 |........|.I...S.H|
|00001890| 61 6e 64 6c 65 4f 61 70 | 70 00 00 00 10 e3 00 00 |andleOap|p.......|
|000018a0| 10 ed 0b 48 61 6e 64 6c | 65 4f 64 6f 63 00 00 00 |...Handl|eOdoc...|
|000018b0| 15 cb 00 00 15 d5 0b 48 | 61 6e 64 6c 65 50 64 6f |.......H|andlePdo|
|000018c0| 63 00 00 00 16 67 00 00 | 16 71 0b 48 61 6e 64 6c |c....g..|.q.Handl|
|000018d0| 65 51 75 69 74 00 00 00 | 00 a2 00 00 00 bb 19 49 |eQuit...|.......I|
|000018e0| 6e 73 74 61 6c 6c 41 70 | 70 6c 65 45 76 65 6e 74 |nstallAp|pleEvent|
|000018f0| 48 61 6e 64 6c 65 72 73 | 00 00 0a 76 00 00 0a 80 |Handlers|...v....|
|00001900| 0b 4e 6f 74 48 61 6e 64 | 6c 65 64 00 00 00 09 3e |.NotHand|led....>|
|00001910| 00 00 09 4a 0d 4f 53 54 | 79 70 65 54 6f 50 53 74 |...J.OST|ypeToPSt|
|00001920| 72 00 00 00 01 00 00 00 | 01 a2 00 00 00 a2 00 00 |r.......|........|
|00001930| 00 32 01 1d 7f d8 05 e2 | 00 00 00 1c 00 32 00 00 |.2......|.....2..|
|00001940| 4d 50 53 52 00 00 00 0a | 03 ef ff ff 00 00 00 00 |MPSR....|........|
|00001950| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001960| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001970| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
+--------+-------------------------+-------------------------+--------+--------+